class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :login, :string, :limit => 80, :null => false
      t.column :email, :string, :limit => 60, :null => false
      t.column :hashed_password, :string, :limit => 40, :null => false
      t.column :display_all, :boolean, :null => false, :default => false
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end

    add_index :users, :login
    add_index :users, :email
  end

  def self.down
    drop_table :users
  end
end
